package com.king;

import com.king.configuration.jpa.SpringSecurityAuditorAware;
import com.king.pojo.entity.SysUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.data.domain.AuditorAware;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;

/**
 * @author liukai
 */
@Slf4j
@EnableJpaAuditing
@SpringBootApplication
public class KingApplication {

    public static void main(String[] args) {
        SpringApplication.run(KingApplication.class, args);
    }

    @Bean
    public AuditorAware<SysUser> auditorProvider() {
        return new SpringSecurityAuditorAware();
    }


}
